home *** CD-ROM | disk | FTP | other *** search
/ How Many Bugs in a Box / How Many Bugs in a Box.cdr / bugs / act6b / 00012_checkit.ls < prev    next >
Encoding:
Text File  |  1995-03-28  |  20.0 KB  |  266 lines

  1. on checkit
  2.   global spa
  3.   set golem to getAt(partlist, spa)
  4.   if field "changer" = golem then
  5.     go("victory")
  6.   else
  7.     if field "changer" < golem then
  8.       go("fewer")
  9.     else
  10.       if field "changer" > golem then
  11.         go("many")
  12.       end if
  13.     end if
  14.   end if
  15. end
  16.  
  17. on startMovie
  18.   global castnumber, firstcursor, takeinput, lastcursor, piecelist, listparts, timenumbers, whirllist
  19.   set timenumbers to the number of cast "timenumbers"
  20.   set takeinput to 0
  21.   set firstcursor to the number of cast "firstcursor"
  22.   set lastcursor to the number of cast "lastcursor"
  23.   set castnumber to []
  24.   repeat with xxx = 0 to 9
  25.     add(castnumber, the number of cast ("digit" & xxx))
  26.   end repeat
  27.   add(castnumber, the number of cast "ones")
  28.   add(castnumber, the number of cast "digit_")
  29.   set piecelist to [[[[179, -1, -1, -1, -1, -1, -1, -1, -1], [180, -1, -1, -1, -1, -1, -1, -1, -1], [181, -1, -1, -1, -1, -1, -1, -1, -1], [182, -1, -1, -1, -1, -1, -1, -1, -1]], [[174, 173, 172, 171, 170, 169, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1]], [[-1, -1, 145, 149, 153, 157, 161, -1, -1], [-1, -1, 146, 150, 154, 158, 162, -1, -1], [-1, -1, 147, 151, 155, 159, 163, -1, -1], [-1, -1, 148, 152, 156, 160, 164, -1, -1]], [[165, -1, -1, -1, -1, -1, -1, -1, -1], [166, -1, -1, -1, -1, -1, -1, -1, -1], [167, -1, -1, -1, -1, -1, -1, -1, -1], [168, -1, -1, -1, -1, -1, -1, -1, -1]], [[175, -1, -1, -1, -1, -1, -1, -1, -1], [176, -1, -1, -1, -1, -1, -1, -1, -1], [177, -1, -1, -1, -1, -1, -1, -1, -1], [178, -1, -1, -1, -1, -1, -1, -1, -1]], [[-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1]]], [[[183, -1, -1, -1, -1, -1, -1, -1, -1], [184, -1, -1, -1, -1, -1, -1, -1, -1], [185, -1, -1, -1, -1, -1, -1, -1, -1], [186, -1, -1, -1, -1, -1, -1, -1, -1]], [[191, -1, -1, -1, -1, -1, -1, -1, -1], [192, -1, -1, -1, -1, -1, -1, -1, -1], [193, -1, -1, -1, -1, -1, -1, -1, -1], [194, -1, -1, -1, -1, -1, -1, -1, -1]], [[199, 199, -1, -1, -1, -1, -1, -1, -1], [200, 200, -1, -1, -1, -1, -1, -1, -1], [201, 201, -1, -1, -1, -1, -1, -1, -1], [202, 202, -1, -1, -1, -1, -1, -1, -1]], [[207, 208, 209, 210, 211, 212, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1]], [[-1, 215, -1, 214, -1, 301, -1, 302, -1], [-1, 217, -1, 216, -1, 303, -1, 304, -1], [-1, 219, -1, 218, -1, 305, -1, 306, -1], [-1, 221, -1, 220, -1, 307, -1, 308, -1]], [[230, 229, 228, 227, 226, 225, 224, 223, 222], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1]]], [[[65, 64, 63, 62, 61, 60, -1, -1, -1], [71, 70, 69, 68, 67, 66, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1]], [[74, -1, -1, -1, -1, -1, -1, -1, -1], [75, -1, -1, -1, -1, -1, -1, -1, -1], [76, -1, -1, -1, -1, -1, -1, -1, -1], [77, -1, -1, -1, -1, -1, -1, -1, -1]], [[82, -1, -1, -1, -1, -1, -1, -1, -1], [83, -1, -1, -1, -1, -1, -1, -1, -1], [84, -1, -1, -1, -1, -1, -1, -1, -1], [85, -1, -1, -1, -1, -1, -1, -1, -1]], [[98, 97, 96, 95, 94, 93, 92, 91, 90], [108, 107, 106, 105, 104, 103, 102, 101, 100], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1]], [[114, 113, 112, 111, 110, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1]], [[116, -1, -1, -1, -1, -1, -1, -1, -1], [117, -1, -1, -1, -1, -1, -1, -1, -1], [118, -1, -1, -1, -1, -1, -1, -1, -1], [119, -1, -1, -1, -1, -1, -1, -1, -1]]], [[[236, -1, -1, -1, -1, -1, -1, -1, -1], [237, -1, -1, -1, -1, -1, -1, -1, -1], [238, -1, -1, -1, -1, -1, -1, -1, -1], [239, -1, -1, -1, -1, -1, -1, -1, -1]], [[244, -1, -1, -1, -1, -1, -1, -1, -1], [245, -1, -1, -1, -1, -1, -1, -1, -1], [246, -1, -1, -1, -1, -1, -1, -1, -1], [247, -1, -1, -1, -1, -1, -1, -1, -1]], [[252, -1, -1, -1, -1, -1, -1, -1, -1], [253, -1, -1, -1, -1, -1, -1, -1, -1], [254, -1, -1, -1, -1, -1, -1, -1, -1], [255, -1, -1, -1, -1, -1, -1, -1, -1]], [[260, 261, 262, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1]], [[264, 265, 266, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1]], [[268, 269, 270, 271, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1]]]]
  30.   set listparts to [[[131, 132, 133, 134], [135, -1, -1, -1], [127, 128, 129, 130], [136, 137, 138, 139], [140, 141, 142, 143], [144, -1, -1, -1]], [[187, 188, 189, 190], [195, 196, 197, 198], [203, 204, 205, 206], [213, -1, -1, -1], [232, 233, 234, 235], [231, -1, -1, -1]], [[73, 72, -1, -1], [78, 79, 80, 81], [86, 87, 88, 89], [99, 109, -1, -1], [115, -1, -1, -1], [120, 121, 122, 123]], [[240, 241, 242, 243], [248, 249, 250, 251], [256, 257, 258, 259], [263, -1, -1, -1], [267, -1, -1, -1], [272, -1, -1, -1]]]
  31.   set whirllist to 2 * [[8.0, -0.0, 6.02069999999999972, -9.73179999999999978, 2.32240000000000002, -13.27439999999999998, -2.43409999999999993, -10.12899999999999956, -7.32920000000000016, -18.05440000000000111, -11.40910000000000046, -22.67139999999999844, -13.91990000000000016, -20.23529999999999873, -14.4916999999999998, -26.25590000000000046, -13.22910000000000075, -31.91489999999999938, -10.68640000000000079, -30.29690000000000083, -7.73069999999999968, -34.3522000000000034, -5.33059999999999956, -40.99989999999999668, -4.31859999999999999, -40.29260000000000019, -5.18729999999999958, -42.36129999999999995, -7.96879999999999988, -49.92490000000000094, -12.22690000000000055, -50.20230000000000103, -17.16400000000000148, -50.30319999999999681, -21.81609999999999872, -58.69120000000000203, -25.28900000000000148, -60.00789999999999935, -26.97739999999999938, -58.19899999999999807, -26.71259999999999835, -67.30360000000000298, -24.80430000000000135, -69.69320000000000448, -21.96460000000000079, -66.07080000000000553, -19.13360000000000127, -75.76980000000000359, -17.24919999999999831, -79.24460000000000548, -17.01760000000000161, -76.05880000000000507, -18.74040000000000106, -84.1004999999999967, -22.24060000000000059, -88.65099999999999625, -26.90609999999999857, -86.16719999999999402, -31.83940000000000126, -92.30910000000000082, -36.07750000000000057, -97.90430000000000632, -38.82759999999999678, -96.23229999999999507, -39.66129999999999711, -100.41140000000000043, -38.61919999999999931, -106.99930000000000518, -36.20130000000000337, -106.23269999999999413, -33.24450000000000216, -108.42549999999999955, -30.71750000000000114, -115.93420000000000414, -29.48379999999999868, -116.14830000000000609, -30.09039999999999893, -116.370900000000006, -32.63349999999999795, -124.71040000000000703, -36.73530000000000229, -125.9608999999999952, -41.63649999999999807, -124.26900000000000546, -46.38179999999999836, -133.33220000000000027, -50.05429999999999779, -135.654200000000003, -51.99969999999999715, -132.14160000000001105, -51.98640000000000327, -141.80719999999999459, -50.26270000000000238, -145.21430000000000859, -47.49519999999999698, -141.98859999999999104, -44.60660000000000025, -150.14599999999998658, -42.54869999999999663, -154.62999999999999545, -42.07039999999999935, -152.09899999999998954], [8.0, -0.0, 7.32240000000000002, -2.97920000000000007, 2.67079999999999984, -5.83539999999999992, 1.08010000000000006, -8.45309999999999917, 6.77090000000000014, -10.73179999999999978, 17.26930000000000121, -12.59190000000000076, 25.68140000000000001, -13.98000000000000043, 27.03119999999999834, -14.87190000000000012, 22.83599999999999852, -15.27439999999999998, 19.71099999999999852, -15.22460000000000058, 23.28740000000000165, -14.78780000000000072, 33.03540000000000276, -14.05330000000000013, 42.75079999999999814, -13.12899999999999956, 46.25959999999999894, -13.86560000000000059, 43.09389999999999787, -16.80630000000000024, 38.92249999999999943, -19.57250000000000156, 40.33870000000000289, -22.05440000000000111, 48.79869999999999663, -24.15990000000000038, 59.28249999999999886, -25.82019999999999982, 64.90959999999999752, -26.99429999999999907, 63.26469999999999771, -27.67139999999999844, 58.61820000000000164, -27.87150000000000105, 58.00030000000000285, -27.64430000000000121, 64.73730000000000473, -27.06619999999999848, 75.39339999999999975, -26.23529999999999873, 82.92959999999999354, -25.26539999999999964, 83.17539999999999623, -27.72100000000000009, 78.66289999999999338, -30.60040000000000049, 76.29919999999999902, -33.25589999999999691, 81.01550000000000296, -35.58460000000000178, 91.23399999999999466, -37.50399999999999778, 100.31789999999999452, -38.95680000000000121, 102.67379999999999995, -39.91490000000000293, 98.89379999999999882, -40.38080000000000069, 95.21139999999999759, -40.38790000000000191, 97.77049999999999841, -39.99779999999999802, 106.97629999999999484, -39.29690000000000083, 117.12330000000000041, -38.39110000000000156, 121.64060000000000628, -38.60119999999999862, 119.13309999999999889, -41.55619999999999692, 114.66450000000000387, -44.3522000000000034, 115.10129999999999484, -46.87760000000000105, 122.80010000000000048, -49.03759999999999764, 133.44089999999999918, -50.75999999999999801, 139.99870000000001369, -51.99989999999999668, 139.20259999999998968, -52.74249999999999972, 134.54259999999999309, -53.00359999999999872, 133.06129999999998859, -52.82930000000000348, 138.87880000000001246, -52.29260000000000019, 149.40469999999999118, -51.48899999999999721, 157.7196999999999889, -50.53059999999999974], [8.0, 0.0, 6.75129999999999963, -0.3659, 5.02069999999999972, 2.36280000000000001, 2.85349999999999993, 8.43549999999999933, 0.32240000000000002, 8.97279999999999944, -2.47739999999999982, 11.16430000000000078, -5.43409999999999993, 16.88230000000000075, -8.42600000000000016, 18.37209999999999965, -11.32920000000000016, 20.04260000000000019, -14.02539999999999942, 25.35150000000000148, -16.40909999999999869, 27.8238999999999983, -18.39440000000000097, 29.0, -19.91989999999999839, 33.85370000000000346, -20.9529999999999994, 37.31929999999999836, -21.49170000000000158, 38.03759999999999764, -21.56449999999999889, 42.39880000000000138, -21.22909999999999897, 46.84839999999999804, -20.56869999999999976, 47.15440000000000254, -19.68639999999999901, 50.99609999999999843, -18.69920000000000115, 56.40050000000000097, -17.73069999999999879, 56.34819999999999851, -16.90330000000000155, 59.65339999999999776, -16.33060000000000045, 65.96460000000000434, -16.11049999999999827, 65.6150999999999982, -16.31859999999999999, 68.37770000000000437, -17.0044000000000004, 74.47060000000000457, -18.18730000000000047, 74.9497999999999962, -19.85589999999999833, 77.17449999999999477, -21.96880000000000166, 82.91639999999999588, -24.45660000000000167, 84.34550000000000125, -27.22690000000000055, 86.0478999999999985, -30.16959999999999908, 91.3837999999999937, -33.16400000000000148, 93.79430000000000689, -36.08599999999999852, 95.00039999999999907, -38.81609999999999872, 99.88370000000000459, -41.24680000000000035, 103.28730000000000189, -43.28900000000000148, 104.03289999999999793, -44.87810000000000343, 108.42579999999999529, -45.97740000000000293, 112.81449999999999534, -46.5805999999999969, 113.14480000000000359, -46.7126000000000019, 117.01949999999999363, -46.42719999999999914, 122.36549999999999727, -45.80429999999999779, 122.33389999999999986, -44.94489999999999696, 125.6728999999999985, -43.96459999999999724, 131.92920000000000869, -42.98649999999999949, 131.59639999999998849, -42.13360000000000127, 134.39279999999999404, -41.5210000000000008, 140.50569999999999027, -41.24920000000000186, 140.9269999999999925, -41.39699999999999847, 143.18500000000000227, -42.01760000000000161, 148.95050000000000523], [4.0, 0.0, 5.16120000000000001, -2.83539999999999992, 4.33539999999999992, -4.73179999999999978, 5.04000000000000004, -4.98000000000000043, 9.38540000000000063, -3.27439999999999998, 16.13459999999999894, 0.2122, 21.84069999999999823, 4.87100000000000044, 24.01559999999999917, 4.19369999999999976, 23.41799999999999926, 1.9456, 23.35549999999999926, 1.17979999999999996, 26.64369999999999905, 2.32859999999999978, 33.01769999999999783, 5.35569999999999968, 39.37539999999999907, 9.76469999999999949, 42.62980000000000302, 11.27899999999999991, 42.54690000000000083, 8.74409999999999954, 41.96119999999999806, 7.49600000000000044, 44.1694000000000031, 8.08510000000000062, 49.89929999999999666, 10.61209999999999987, 56.64130000000000109, 14.70309999999999917, 60.95479999999999876, 18.39880000000000138, 61.63230000000000075, 15.64780000000000015, 60.80910000000000082, 13.96240000000000059, 62.00019999999999953, 14.00009999999999977, 66.86870000000000402, 15.99639999999999951, 73.69670000000000698, 19.70739999999999981, 78.96479999999999677, 24.46940000000000026, 80.58769999999999811, 22.63870000000000005, 79.83140000000000214, 20.56970000000000098, 80.14960000000000662, 20.07509999999999906, 84.00780000000000314, 21.52080000000000126, 90.61700000000000443, 24.79769999999999897, 96.65900000000000603, 29.34829999999999828, 99.33689999999999998, 29.69679999999999964, 98.94689999999999941, 27.30570000000000164, 98.60569999999999879, 26.30880000000000152, 101.38519999999999754, 27.19500000000000028, 107.48810000000000286, 29.99210000000000065, 114.06170000000000186, 34.26019999999999754, 117.82030000000000314, 36.80100000000000193, 118.066599999999994, 34.15570000000000306, 117.33220000000000027, 32.69639999999999702, 119.05060000000000286, 33.02539999999999765, 124.40009999999999479, 35.30680000000000263, 131.22049999999998704, 39.22690000000000055, 135.9994000000000085, 43.92920000000000158, 137.10130000000000905, 41.10260000000000247, 136.27129999999999654, 39.23020000000000351, 137.03069999999999595, 39.01530000000000342, 141.43940000000000623, 40.75540000000000163, 148.20240000000001146, 44.26910000000000167, 153.85990000000001032, 48.94120000000000203]]
  32. end
  33.  
  34. on stopMovie
  35.   repeat with xxx = 1 to 48
  36.     set the visible of sprite xxx to 1
  37.   end repeat
  38. end
  39.  
  40. on piececastnum bugnum, part, color, number
  41.   global piecelist
  42.   return getAt(getAt(getAt(getAt(piecelist, number), color), part), bugnum)
  43. end
  44.  
  45. on cleartherest tsprite
  46.   set thang to []
  47.   repeat with xxx = 10 to 33
  48.     add(thang, xxx)
  49.   end repeat
  50.   repeat with xxx = 0 to 5
  51.     deleteAt(thang, getPos(thang, xxx + tsprite))
  52.   end repeat
  53.   set nowblend to 100
  54.   set ptime to the timer
  55.   repeat while (the timer - ptime) < 60
  56.     set nowblend to 70 - (the timer - ptime)
  57.     if nowblend < 10 then
  58.       exit repeat
  59.     end if
  60.     repeat with xxx in thang
  61.       set the blend of sprite xxx to nowblend
  62.     end repeat
  63.     updateStage()
  64.     set nowblend to nowblend - 10
  65.   end repeat
  66.   repeat with xxx in thang
  67.     set the visible of sprite xxx to 0
  68.   end repeat
  69. end
  70.  
  71. on makebugpieces numberofbugs
  72.   global piecelist
  73.   startTimer()
  74.   set piecelist to []
  75.   repeat with bugnum = 1 to numberofbugs
  76.     set rep1 to []
  77.     repeat with piece = 1 to 6
  78.       set rep2 to []
  79.       repeat with xxx = 1 to 4
  80.         set rep3 to []
  81.         repeat with yyy = 1 to 9
  82.           set apiece to "bug" & bugnum & "." & piece & "." & xxx & "." & yyy
  83.           set apiece to apiece
  84.           add(rep3, the number of cast apiece)
  85.         end repeat
  86.         add(rep2, rep3)
  87.       end repeat
  88.       add(rep1, rep2)
  89.     end repeat
  90.     add(piecelist, rep1)
  91.   end repeat
  92.   put the timer
  93.   set the text of cast "stretcher" to string(piecelist)
  94. end
  95.  
  96. on makebugparts numberofbugs
  97.   global partpointers
  98.   startTimer()
  99.   set partpointers to []
  100.   repeat with bugnum = 1 to numberofbugs
  101.     set rep1 to []
  102.     repeat with piece = 1 to 6
  103.       set rep2 to []
  104.       repeat with xxx = 1 to 4
  105.         set rep3 to []
  106.         set apiece to "part" & bugnum & "." & piece & "." & xxx
  107.         add(rep2, the number of cast apiece)
  108.       end repeat
  109.       add(rep1, rep2)
  110.     end repeat
  111.     add(partpointers, rep1)
  112.   end repeat
  113.   put the timer
  114.   set the text of cast "stretcher" to string(partpointers)
  115. end
  116.  
  117. on dotimer
  118.   global timenumbers, worldtimer
  119.   set mytime to worldtimer - (the timer / 60)
  120.   if mytime < 1 then
  121.     go("times up")
  122.   end if
  123.   set theminutes to mytime / 60
  124.   set thetens to (mytime - (theminutes * 60)) / 10
  125.   set theones to (mytime - (theminutes * 60)) mod 10
  126.   put mytime, theminutes, thetens, theones
  127.   if theminutes < 1 then
  128.     set theminutes to -1
  129.   end if
  130.   set the castNum of sprite 36 to timenumbers + theminutes
  131.   set the castNum of sprite 38 to timenumbers + thetens
  132.   set the castNum of sprite 39 to timenumbers + theones
  133.   updateStage()
  134. end
  135.  
  136. on colorbug
  137.   global whogetsit, cyclestep, incycle
  138.   if the timer < 10 then
  139.     exit
  140.   end if
  141.   startTimer()
  142.   set cyclestep to cyclestep + incycle
  143.   if (cyclestep > 254) or (cyclestep < 250) then
  144.     set incycle to -incycle
  145.   end if
  146.   repeat with xxx = 1 to count(whogetsit)
  147.     set the foreColor of sprite getAt(whogetsit, xxx) to cyclestep
  148.     set the backColor of sprite getAt(whogetsit, xxx) to cyclestep - 4
  149.   end repeat
  150. end
  151.  
  152. on addcolorbug thisbug
  153.   global whogetsit, cyclestep, incycle
  154.   set incycle to 1
  155.   set cyclestep to 250
  156.   if not listp(whogetsit) then
  157.     set whogetsit to []
  158.   end if
  159.   set tsprite to (thisbug * 6) + 4
  160.   repeat with xxx = 0 to 5
  161.     add(whogetsit, xxx + tsprite)
  162.   end repeat
  163. end
  164.  
  165. on tester
  166.   repeat with xxx = 10 to 32
  167.     put xxx, 1 + ((xxx - 10) / 6)
  168.   end repeat
  169. end
  170.  
  171. on glaze thispart
  172.   global whogetsit, partlist
  173.   set backup to whogetsit
  174.   set whogetsit to []
  175.   repeat with yyy = 0 to 3
  176.     add(whogetsit, 9 + (6 * yyy) + thispart)
  177.   end repeat
  178.   repeat while the stillDown
  179.     colorbug()
  180.     updateStage()
  181.   end repeat
  182.   set whogetsit to []
  183.   repeat with yyy = 0 to 3
  184.     set the foreColor of sprite (9 + (6 * yyy) + thispart) to 255
  185.     set the backColor of sprite (9 + (6 * yyy) + thispart) to 0
  186.   end repeat
  187.   set whogetsit to backup
  188. end
  189.  
  190. on animateit whodat
  191.   global whirllist, whogetsit
  192.   set the visible of sprite 34 to 1
  193.   set thiswhirl to whodat
  194.   set whogetsit to []
  195.   addcolorbug(whodat)
  196.   set whichwhirl to getAt(whirllist, thiswhirl)
  197.   set mysprite to getAt(whogetsit, 1)
  198.   set myx to the locH of sprite mysprite
  199.   set myy to the locV of sprite mysprite
  200.   repeat with tangle = 0 to (count(whichwhirl) / 2) - 1
  201.     repeat with xxx = 0 to 5
  202.       set the locH of sprite (mysprite + xxx) to myx + getAt(whichwhirl, (tangle * 2) + 1)
  203.       set the locV of sprite (mysprite + xxx) to myy + getAt(whichwhirl, (tangle * 2) + 2)
  204.     end repeat
  205.     updateStage()
  206.   end repeat
  207.   set whogetsit to []
  208. end
  209.  
  210. on exchange sold, snew
  211.   set stemp to []
  212.   add(stemp, the castNum of sprite sold)
  213.   add(stemp, the locH of sprite sold)
  214.   add(stemp, the locV of sprite sold)
  215.   set the castNum of sprite sold to the castNum of sprite snew
  216.   set the locV of sprite sold to the locV of sprite snew
  217.   set the locH of sprite sold to the locH of sprite snew
  218.   set the castNum of sprite snew to getAt(stemp, 1)
  219.   set the locH of sprite snew to getAt(stemp, 2)
  220.   set the locV of sprite snew to getAt(stemp, 3)
  221.   set the blend of sprite sold to 100
  222.   set the blend of sprite snew to 100
  223.   set the foreColor of sprite sold to 255
  224.   set the foreColor of sprite snew to 255
  225.   set the backColor of sprite sold to 0
  226.   set the backColor of sprite snew to 0
  227. end
  228.  
  229. on superexchange whodat
  230.   set oldoff to 4 + (6 * whodat)
  231.   set newoff to 28
  232.   repeat with xxx = 0 to 5
  233.     exchange(oldoff + xxx, newoff + xxx)
  234.   end repeat
  235.   updateStage()
  236. end
  237.  
  238. on makewhirl
  239.   set allwhirls to []
  240.   set whirllist to []
  241.   repeat with xxx = 0.0 to PI * 16
  242.     add(whirllist, -xxx + (cos(xxx / 2) * 8))
  243.     add(whirllist, (-xxx * 3) + -abs(sin(xxx) * 8))
  244.   end repeat
  245.   add(allwhirls, whirllist)
  246.   set whirllist to []
  247.   repeat with xxx = 0.0 to PI * 16
  248.     add(whirllist, (xxx * 3) + (cos(xxx) * 8))
  249.     add(whirllist, -xxx + -abs(sin(xxx / 4) * 8))
  250.   end repeat
  251.   add(allwhirls, whirllist)
  252.   set whirllist to []
  253.   repeat with xxx = 0.0 to PI * 16
  254.     add(whirllist, -xxx + (cos(xxx / 4) * 8))
  255.     add(whirllist, (xxx * 3) + -abs(sin(xxx) * 4))
  256.   end repeat
  257.   add(allwhirls, whirllist)
  258.   set whirllist to []
  259.   repeat with xxx = 0.0 to PI * 16
  260.     add(whirllist, (xxx * 3) + (cos(xxx) * 4))
  261.     add(whirllist, xxx + -abs(sin(xxx / 2) * 8))
  262.   end repeat
  263.   add(allwhirls, whirllist)
  264.   set the text of cast "loony" to string(allwhirls)
  265. end
  266.